1. The Field of the Invention
The present invention relates to multi-threading computer applications and, more particularly, to managing persistent multi-threading connections for multiple distinct modules.
2. The Relevant Technology
Many applications, particularly those for use by consumers, are event-driven. Processing is centered on events generated by the user, such as mouse movements and clicks, key presses, and the like. Execution consists of catching events and processing them according to the applications handling functions. Modern applications may be extremely complex and are often organized into a number of modules, each relating to a specific task or class of tasks. Although the modules may not interact with one another, they typically operate subject to the control of a main application.
Web-based applications are also event-driven. User clicks and text input is transmitted to an application executed on a server. The server processes the user inputs and may update a web page or remote client interface in response. A typical web-based application must support multiple users accessing the application from workstations connected to the internet.
A common architecture for modular and web-based application is an Event-driven State Machine (EDSM). The EDSM receives events from each module or web-based user and processes them one at a time, thus multiplexing multiple currently executing modules or web-based sessions. Each module or web-based session is a separate context comprising data indicating its current processing state.
The EDSM architecture is ineffective in many respects. Because each session is a monolithic application, it must internally maintain data regarding the state of each module or user session. It further must manage switching between contexts of each module or user session, including prioritizing, allocating resources, optimizing processor efficiency by ensuring that the active context is not waiting for another resource such as a printer or hard drive. This complexity of EDSM architectures requires a great deal of processor time and makes them difficult to design, program, and debug.
In view of the foregoing it would be an advancement in the art to provide an architecture for modular and web-based applications that overcomes many of the deficiencies of the EDSM architecture.